package cn.com.connext.scrm.repository.master;

import cn.com.connext.scrm.domain.master.Member;
import cn.com.connext.scrm.domain.master.MiniProgramUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MiniProgramUserRepository extends JpaRepository<MiniProgramUser, String>, JpaSpecificationExecutor<MiniProgramUser> {

    MiniProgramUser findByUnionId(String unionId);
    @Query(value = "select m from MiniProgramUser m where m.unionId in (?1)")
    List<MiniProgramUser> findUserMsg(@Param("unionIdList")List<String> unionIdList);
}
